package com.yzt.dynamicmodule.presenter;

import com.alibaba.fastjson.JSONObject;
import com.yzt.zhuju.network.AresSubscriber;
import com.yzt.zhuju.network.biz.BizLayer;
import com.yzt.dynamicmodule.contacts.AddDynamicContacts;

public class AddDynamicPresenter extends AddDynamicContacts.Presenter {

    /**
     * 添加动态
     */
    @Override
    public void publicDynamic(JSONObject json) {

        BizLayer.getInstance().getDynamicModule().dynamicAdd(json, new AresSubscriber<Object>() {
            @Override
            protected void onSuccess(Object list) {
                mView.publishSuccess();
            }

            @Override
            protected void onError(int code, String info) {
                super.onError(code, info);
                mView.publishEnd();
            }
        });
    }
}
